package io.renren.modules.meta.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.meta.entity.EventEntity;
import io.renren.modules.subject.entity.BaseSubjectExtend;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 
 * 
 * @author linyuan
 * @email linyuan@gmail.com
 * @date 2023-08-25 18:40:01
 */
@Mapper
public interface EventEntityMapper extends BaseMapper<EventEntity> {
    List<EventEntity> selectAllByName(String name);

    List<BaseSubjectExtend> selectSubjectsByEventId(@Param("eventId") Long eventId, @Param("middleTable") String tableName,@Param("subjectTable") String subjectName);
    int insertEventSubject(@Param("eventId") Long eventId, @Param("subjectId") Long subjectId, @Param("tableName") String tableName);
    int deleteEventSubject(@Param("eventId") Long eventId, @Param("subjectId") Long subjectId, @Param("tableName") String tableName);

}

